package cn.kingyang.yiyi.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jtech.view.RecyclerHolder;

import cn.kingyang.yiyi.R;
import cn.kingyang.yiyi.mvp.model.bean.Forum;
import cn.kingyang.yiyi.ui.adapter.base.BaseAdapter;
import cn.kingyang.yiyi.utils.AppUtil;


/**
 * Created by Administrator on 2017/1/7.
 */

public class ForumInfoAdapter extends BaseAdapter<Forum> {

    public ForumInfoAdapter(Context context) {
        super(context);
    }

    @Override
    protected View createView(LayoutInflater layoutInflater, ViewGroup viewGroup, int i) {
        return layoutInflater.inflate(R.layout.item_my,null);
    }

    @Override
    protected void convert(RecyclerHolder recyclerHolder,Forum info, int i) {
        recyclerHolder.setImageResource(R.id.pic,info.getImg());
        recyclerHolder.setText(R.id.title,info.getTitle());
        recyclerHolder.setText(R.id.desc,info.getDesc());
        recyclerHolder.setText(R.id.num,"发帖数："+ AppUtil.getRandom(10000,99999)+"回帖数"+AppUtil.getRandom(50000,99999));
    }
}
